
// src/main/java/cn/edu/cdu/health/service/IDepartmentService.java
package cn.edu.cdu.health.service;

import cn.edu.cdu.health.entity.Department;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;

public interface IDepartmentService extends IService<Department> {

    /**
     * 根据科室编码查询
     */
    Department getByDeptCode(String deptCode);

    /**
     * 分页查询科室列表
     */
    IPage<Department> getDepartmentPage(int current, int size, String keyword);

    /**
     * 获取所有有效的科室
     */
    List<Department> getActiveDepartments();

    /**
     * 更新科室状态
     */
    boolean updateStatus(Long id, Integer status);

    /**
     * 检查科室编码是否存在
     */
    boolean isDeptCodeExists(String deptCode);

    /**
     * 逻辑删除科室
     */
    boolean logicDelete(Long id);
}